
a=[1 1; 2 2; 3 3; 4 4; 5 5; 6 6; 7 7];
[b,d]=BPSelection(a,2);
b(1)==1
b(2)==7
LAESA(a,b,d,[3 3])==3
LAESA(a,b,d,[4.5 4.1])==4
for i=1:1000
    p=rand(1000,10);
    t=rand(1,10);
    t2(i)=NN(p,t);
    [b,d]=BPSelection(p, 100);
    t1(i)=LAESA(p,b,d,t);
end
find(t1~=t2)